const promise = new Promise((resolve, reject) => {

})

promise.then(res => {

}, err => {

})

// 完全等价
new Promise((resolve, reject) => {
  console.log("-----");
  // resolve()
  // reject()
}).then(res => {
  console.log("res", res);
}, err => {
  console.log("err", err);
})

